Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Time Base Functions / Working With Times


AddTime

The AddTime function adds two times. You must specify the times in time structures.

pascal void AddTime (TimeRecord *dst, const TimeRecord *src); 
dst
Contains a pointer to a time structure. This time structure contains one of the operands for the addition. The AddTime function returns the result of the addition into this time structure.
src
Contains a pointer to a time structure. The Movie Toolbox adds this value to the time or duration specified by the dst parameter.
DESCRIPTION
If these times are relative to different time scales or time bases, the AddTime function converts the times as appropriate to yield reasonable results. However, the time bases for both time values must rely on the same time source.

The result value is formatted based on the operands as follows:
dstsrcResult
DurationDurationDuration
Time valueDurationTime value

ERROR CODES
None


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996